home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 540 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  2.4 KB

  1. Date: Mon, 11 Oct 93 17:30:39 -0400
  2. From: "Nicholas S Castellano" <entropy@terminator.rs.itd.umich.edu>
  3. To: ersmith@netcom.com
  4. Subject: Resource tracking
  5.  
  6.  
  7. Eric,
  8.  
  9. I'd like to add code to MiNT to support more resource tracking than is
  10. currently implemented.
  11.  
  12. There's currently room in the rusage structure for three more
  13. elements.  BSD's rusage has many more elements than we have room for.
  14. Many of these are related to things MiNT doesn't know about (paging
  15. and virtual memory related things) but there's a possibility we'll be
  16. able to track more than 3 new things with relative simplicity.  The
  17. three simplest I can think of, which have almost no overhead are
  18. number of signals received, and number of voluntary & involuntary
  19. context switches.
  20.  
  21. I will probably send you a patch to track these three resources in a
  22. day or two.  But this brings up the question of what we do if we want
  23. to track more resources in the future, since there will be no more
  24. room in the rusage structure?
  25.  
  26. I can think of several ways of dealing with this:
  27.  
  28. - Leave those three elements of the structure reserved in case we
  29.   really need to track a specific resource later on.
  30.   (I'm not personally fond of this one, but it's certainly a
  31.   possiblity).
  32.  
  33. - Expand the defined rusage structure size now, and give people some
  34.   time to recompile any existing applications that rely on the size of
  35.   this structure.  Then, at some point in the future, actually fill in
  36.   the structure more fully.  (Again, not a great idea IMHO).
  37.  
  38. - Add new system calls Prusage2() and Pwaitpid2() that take an
  39.   additional parameter to be filled with any new resource tracking
  40.   information.  (OK, but kind of crufty.)
  41.  
  42. - Add a new system call, Prusagelen(n), to inform MiNT that we are
  43.   able to cope with 'n' rusage elements. (One of the better ideas, i
  44.   think)
  45.  
  46. - Add a new system call, Paware(v), to inform MiNT that we are aware
  47.   of any features added in MiNT up to and including version 'v' where
  48.   'v' is a number in the same format as the __mint variable.  Then
  49.   if and when the rusage size is expanded, applications that want the
  50.   extra information (or any new but backwards-incompatible feature)
  51.   can declare that they are capable of dealing with this new feature
  52.   by claiming to be compatible with that version of MiNT.
  53.  
  54. What do you think?
  55.  
  56. --
  57. entropy -- it's not just a good idea, it's the second law.
  58. Personal mail:      entropy@gnu.ai.mit.edu
  59. MiNT library mail:  entropy@terminator.rs.itd.umich.edu
  60.  
  61.  
  62.